Regarding PTRACE implementation in QEMU user mode
hi,
Can someone explain why explain why ptrace system call is not implemented in QEMU? if someone is working on it, please share some ideas.
Thanks & Regards,
Sathish
Get an email ID as [email protected] or [email protected]. Click here http://in.promos.yahoo.com/address
Quoted 2 lines
Can someone explain why explain why ptrace system call is not implemented in QEMU? if someone is working on it, please share some ideas.
Because it's extremely hard (read: nearly impossible) to implement properly. ptrace allows direct access to the state of a different process. Passing through ptrace would give you the state of qemu itself, not the program you're interested in, so you have to emulate everything via some othe IPC mechanism (which must also be hidden from the emulated application). This includes signals like SIGSTOP which cannot be trapped.
If you're not extremely careful you end up with a monstrosity like Cygwin, and all the problems that implies.
Paul
Quoted 5 lines · Paul Brook
Quoted 2 lines
Can someone explain why explain why ptrace system call is not implemented in QEMU? if someone is working on it, please share some ideas.
Because it's extremely hard (read: nearly impossible) to implement properly.
I'll also note that the usual use of ptrace if for gdb/gdbserver. You should use the builtin qemu gdb stub instead.
Paul
Quoted 9 lines · Paul Brook
Quoted 5 lines · Paul Brook
Quoted 2 lines
Can someone explain why explain why ptrace system call is not implemented in QEMU? if someone is working on it, please share some ideas.
Because it's extremely hard (read: nearly impossible) to implement properly.
I'll also note that the usual use of ptrace if for gdb/gdbserver. You should use the builtin qemu gdb stub instead.
The other usual use is strace, which seems like it would be useful for user mode emulation.
-- Jamie
Quoted 5 lines · Jamie Lokier
Quoted 4 lines · Paul Brook
Quoted 3 lines · Paul Brook
Quoted 2 lines
Can someone explain why explain why ptrace system call is not implemented in QEMU? if someone is working on it, please share some ideas.
Quoted 8 lines
Quoted 5 lines
Quoted 2 lines
Because it's extremely hard (read: nearly impossible) to implement properly.
I'll also note that the usual use of ptrace if for gdb/gdbserver. You should use the builtin qemu gdb stub instead.
The other usual use is strace, which seems like it would be useful for user mode emulation.
Set QEMU_STRACE environment variable.
Signature · 3 lines
Regards, Kirill A. Shutemov + Belarus, Minsk + ALT Linux Team, http://www.altlinux.com/